Remember the episode "Just A Guy"?
Remember when Sonic woke up from talking to Mike and was a guy taking out the trash?
The truth is, Sonic is actually a human in a costume who made up this world. He's not in a coma or anything, but he made up this universe to either entertain himself or because in real life, he's "just a guy" and he wants to be something better. So he made up this universe to boost his ego.